This invention relates to accessing information in a database.
A database is a body of information that is logically organized so that it can be stored, searched and retrieved in a coherent manner by a "database engine"--a collection of software methods for manipulating data in the database. The software methods typically are implemented as a set of callable routines, either functions, which return a value, or procedures, which do not return a value.
Databases generally fall into three categories: relational databases, object-oriented databases and object-relational databases. A relational database (RDB) is a collection of fixed-field two-dimensional tables that can be related (or "joined") to each other in virtually any manner a database developer chooses. The structure of a relational database can be modified by selectively redefining the relationships between the tables. A database engine may perform complex searches on a relational database quickly and easily by using any of various database query protocols such as the method expressed by the Structured Query Language (SQL) or by other mechanisms. The relationships between the tables enable results of a search to be automatically cross-referenced to corresponding information in other tables in the database.
As shown in FIG. 1, for example, a relational database 100 includes a customer table 102 which is joined by a logical link 103 to an order table 104 which in turn is joined by a logical link 105 to an inventory table 106. A user may query the database 100, for example, for all order numbers higher than a threshold value. Because the order table 104 is joined with the customer table 102 and the inventory table 106, a list of order numbers identified in response to the query can be retrieved and displayed along with the respective customer names and inventory items that correspond to the identified order numbers.
An object-oriented database (OODB) is a collection of "objects"--software elements that contain both data and methods for manipulating that data. In contrast to a relational database which can store only numeric or character-type data, an OODB can store data of virtually any type (text, 3D graphic images, video clips, etc.). An OODB stores its constituent objects in a hierarchy of classes with associated methods so that the OODB contains much of the logic it needs to do useful work. A relational database in contrast contains only data and must rely on external application software to perform useful functions with the data.
An object-relational database (ORDB) is a hybrid of the other two types. Extended data (e.g., a movie file) may be stored and retrieved in an ORDB either as part of a row or as a binary large object (BLOB)--an undifferentiated mass of data. An ORDB also can access methods (e.g., a utility for viewing movie files) for manipulating the data contained within a BLOB. These methods may be maintained separately from the database engine or may be linked to it depending on the particular ORDB implementation.
In an extensible object-relational database management system (ORDBMS) such as the Informix.RTM. Universal Server (IUS.RTM.), methods for manipulating extended data are linked directly to the database engine so that the extended data is treated as a "native" data type--that is, a data type that the ORDBMS itself can manipulate without resorting to external applications. In FIG. 2, for example, an extensible ORDBMS 200 has extensions X and Y, which respectively contain methods for manipulating data types X and Y, linked directly to the database engine 202. In response to a database query that points to data of type X, for example, the database engine 202 automatically invokes the methods in extension X to manipulate the data in an appropriate data type-specific manner.
A non-extensible ORDBMS, in contrast, does not allow data manipulation methods for arbitrary data types to be linked to the database engine but rather requires the use of multiple data type-specific engines, interconnected via layers of middleware, to manage multiple data types. As a result, a non-extensible ORDBMS generally exhibits reduced performance and presents a developer with increased complexity in deploying new applications.